package com.woniuxy.food.service.util;

import org.springframework.web.multipart.MultipartFile;

import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.IOException;

public class CheckImage {
    public static boolean isImage(MultipartFile file) throws IOException {
        BufferedImage read = ImageIO.read(file.getInputStream());
        if (read==null) {
            return false;
        }
        return true;
    }
}
